package cool.gaogao.jdbcTemplate.book.service;

import cool.gaogao.jdbcTemplate.book.bean.Book;
import cool.gaogao.jdbcTemplate.book.dao.BookDao;
import org.springframework.beans.factory.annotation.Autowired;
import org.springframework.beans.factory.annotation.Qualifier;
import org.springframework.stereotype.Service;

import java.util.List;

/**
 * @author 高山青
 * @Date 2021/12/31  -   16:27
 */
@Service("bookService")
public class BookServiceImp implements BookService{

	@Autowired
	private BookDao bookDao;

	@Override
	public int addBook(Book book) {
		return bookDao.addBook(book);
	}

	@Override
	public int updateBook(Book book) {
		return bookDao.updateBook(book);
	}

	@Override
	public int deleteBook(Book book) {
		return bookDao.deleteBook(book);
	}

	@Override
	public int getCount() {
		return bookDao.getCount();
	}

	@Override
	public Book findBook(Book book) {
		return bookDao.findBook(book);
	}

	@Override
	public List<Book> findAll() {
		return bookDao.findAll();
	}

	@Override
	public int[] bathAddBook(List<Object[]> books) {
		return bookDao.bathAddBook(books);
	}

	@Override
	public int[] bathUpdateBook(List<Object[]> books) {
		return bookDao.bathUpdateBook(books);
	}

	@Override
	public int[] bathDeleteBook(List<Object[]> books) {
		return bookDao.bathDeleteBook(books);
	}
}
